import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/jingxuan"
  },
  {
    name: "firstpage",
    path: "/firstpage",
    component: () => import('@/views/web-firstPage.vue'),
    children:[
      {
        path:"/pagecomputer",
        name:"pagecomputer",
        component: ()=> import ('@/pages/page-computer.vue')

      },
      {
        path:"/pagephone",
        name:"pagephone",
        component: ()=> import ('@/pages/page-phone.vue')

      },
      {
        path:'/jingxuan',
        name:"jingxuan",
        component: ()=> import('@/pages/page-jingxuan.vue')
      },
      {
        path:'/fengjing',
        name:"fengjing",
        component: ()=> import('@/pages/page-fengjing.vue')
      },
      {
        path:'/dongman',
        name:"dongman",
        component: ()=> import('@/pages/page-dongman.vue')
      },
      {
        path:'/mingxing',
        name:"mingxing",
        component: ()=> import('@/pages/page-mingxing.vue')
      },
      {
        path:'/meinv',
        name:"meinv",
        component: ()=> import('@/pages/page-meinv.vue')
      },
      {
        path:'/kehuan',
        name:"kehuan",
        component: ()=> import('@/pages/page-kehuan.vue')
      },
      {
        path:'/youxi',
        name:"youxi",
        component: ()=> import('@/pages/page-youxi.vue')
      },
      {
        path:'/qiche',
        name:"qiche",
        component: ()=> import('@/pages/page-qiche.vue')
      },
      {
        path:'/tiyu',
        name:"tiyu",
        component: ()=> import('@/pages/page-tiyu.vue')
      }


    ]
  },
  {
    name:'compheader',
    path: "/compheader",
    component: () => import('@/components/comp-header.vue')
  },
  {
    name: "gongneng",
    path: "/gongneng",
    component: () => import('@/views/web-gongneng.vue'),
    children:[ 
      {
        name:"compZhuomian",
        path:"/zhuomian",
        component:() => import ('@/components/comp-zhuomian.vue')
      },
      {
        name:"compBizhi",
        path:"/bizhi",
        component:() => import ('@/components/comp-bizhi.vue')
      },
      {
        name:"compZhizuo",
        path:"/zhizuo",
        component:() => import ('@/components/comp-zhizuo.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
